package com.joysuch.wwyt.dynamicdata.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 描述：异常状态类型枚举<br>
 *
 * @author jingwk<br>
 * @version 1.0 <br>
 * 日期:2021年12月01日 上午10:57:00
 */
public enum ProcessorSelector {

    INSERT("insert"),
    UPDATE("update"),
    IMPORT("import"),
    EXPORT("export"),
    SELECT("select");

    private String value;

    ProcessorSelector(String value) {
        this.value = value;
    }

    public final String getValue() {
        return value;
    }


    private static final Map<String, ProcessorSelector> lookup = new HashMap<>();

    static {
        for (ProcessorSelector e : EnumSet.allOf(ProcessorSelector.class)) {
            lookup.put(e.value, e);
        }
    }

    public static ProcessorSelector find(String value) {
        return lookup.get(value);
    }
}
